<?php
/**
 * Created by PhpStorm.
 * User: soulmates
 * Date: 2017/8/15
 * Time: 上午8:15
 */
namespace app\restaurantadmin\validate;

use think\Validate;

class Addshopval extends Validate
{
    // 'adminname'  =>  'require|unique:shopadmins',
    //        'phone' => 'require|length:11|number|unique:shopadmins',
    //        'adminpass' => 'require',

    protected $rule = [

        'shopname' => 'require|max:50|unique:dining',
        'address' => 'require|max:100',
        'phonenum' => 'require|length:11|number|unique:dining',
        'service'=>'require',
        'shoptime'=>'require',
        'intro'=>'require|max:500',
        'comment'=>'max:500',


    ];
    protected $message = [

        'shopname.require'  => '店铺名称不能为空！',
        'shopname.max'  => '店铺类型名称不能超过50个字！',
        'shopname.unique'  => '店铺名称已经存在！',
        'address.require'  => '店铺名称不能为空！',
        'phonenum.number'  => '手机号格式错误！',
        'phonenum.length'  => '手机号格式错误！',
        'phonenum.unique'  => '手机号已经存在！',
        'phonenum.require'  => '手机号不能为空！',
        'service.require'  => '服务环境不能为空！',
        'shoptime.require'  => '营业时间不能为空！',
        'intro.require'  => '店铺介绍不能为空！',
        'intro.max'  => '店铺介绍不能超过500个字！',
        'comment.max'  => '备注不能超过500个字！',

    ];


}





?>